package com.xdb.sqlparser.dialect.mysql.ast.statement;

import com.xdb.sqlparser.ast.statement.SQLCreateIndexStatement;
import com.xdb.sqlparser.dialect.mysql.visitor.MySqlASTVisitor;
import com.xdb.sqlparser.visitor.SQLAstVisitor;
import com.xdb.util.JDBCConstants;

public class MySqlCreateIndexStatement extends SQLCreateIndexStatement implements MySqlStatement {

	private String using;

	public MySqlCreateIndexStatement() {
		super(JDBCConstants.MYSQL);
	}

	public String getUsing() {
		return using;
	}

	public void setUsing(String using) {
		this.using = using;
	}

	protected void accept0(SQLAstVisitor visitor) {
		accept0((MySqlASTVisitor) visitor);
	}

	@Override
	public void accept0(MySqlASTVisitor visitor) {
		if (visitor.visit(this)) {
			acceptChild(visitor, getName());
			acceptChild(visitor, getTable());
			acceptChild(visitor, getItems());
		}
		visitor.endVisit(this);
	}
}
